/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */

/**
 * <p>Project: javase - T3
 * <p>Powered by webrx On 2021-11-29 10:24:36
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class T3 {
    public static void main(String[] args) {
        T3 t = new T3();
        t.m1(3);

        T3.m2(4);

        System.out.println(T3.sum(10, 20));

        System.out.println(T3.sum(1, 2));

    }

    public static int sum(int... a) {
        int s = 0;
        for (int i : a) {
            s += i;
        }
        return s;
    }

    public static int sum(int a, int b) {
        return a + b;
    }

    public static void m2(int i) {
        System.out.println(i * i * i);
    }

    void m1(int i) {
        System.out.println(i * i);
    }
}
